import Vue from 'vue'
import Router from 'vue-router'
import Main from '@/main.vue'
import Detail from '@/views/detail'


Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Main',
      redirect:"/home",
      component: Main,
      children: [
        { path: 'home', component: resolve => require(['@/views/home'],resolve)},
        { path: 'rank', component: resolve => require(['@/views/rank'],resolve)},
        { path: 'lesson', component: resolve => require(['@/views/lesson'],resolve)},
      ]
    },
    {
      path:'/detail',
      name:'Detail',
      component: Detail,
      meta: {
        newOne:false,
      }

    },
    {
      path:'/pay',
      name:'Pay',
      component: resolve => require(['@/views/pay'],resolve),
    }
  ]
})
